Bentley OpenComms Designer Help

Command Line Extracts for OpenComms PowerView

The user can control many aspects of the Command Line exports by using a series of switches in the command line. Some of these are optional, and some are required, depending on the mode being used to determine the area being exported. The command line can be used to execute taskfiles that have already been created or it can be used to perform extracts from an SQL query.

To see what command line switches are available, change directories in the command prompt to the root directory of OpenCommsDesigner and at the prompt, key in ‘cpvextract --?’ (That is a minus minus questionmark):

The following switches are available as command line parameters to add to the CPVExtract.exe command:

  • --Execute=<DB|DGN|BOTH>: Execute specified task file (or query). DB=Data only export; DGN=Graphics only export; Both=both. (The –Execute= parameter is required for all extracts—whether query or taskfile.)
  • --ProgressType=<Dialog|File>: Define type of output for progress. Default is file. (Optional)
  • --ShowEditTasks: Show Edit Tasks Dialog. (Optional)
  • --TaskFile=<FileName>: Name of task file to edit or execute. (Mutually exclusive and never used with --Query=). If Execute is not supplied, the Define Task dialog for this task will display.
    Note: Command Line Extracts must be performed with either a ‘--TaskFile=’ parameter or a ‘--Query=’ parameter, but never both. If using a TaskFile, there will not be a ‘--Query=’ or a ‘BoundaryDef=’ switch.
  • --Query=<sql>: Defines a query to use to get the primary key, boundary name and seed file (seedfile is optional) for boundaries to process. (Mutually exclusive and never used with ‘--TaskFile= ‘.)

    Sample query: “Select xfm_id BdryPKValue, name BdryName from boundary where type=’xyz’”

  • --BoundaryDef=<BoundaryDefName>: Name of the boundary definition (required) to use with the --Query option. The Boundary definition describes the table holding the boundary primary key values returned in the query. The two BoundaryDefs named ‘Fiber Hubs’ and ‘Coax Nodes’ are the BoundaryDefinitions that ship with OpenComms.
    Note: For more details on using the --Query= parameter, see the ‘Command Line Extracts using an SQL Query’ section below.
  • --FolderCreation=<OneInEach|AllInOne>: Defines if one folder is created for each boundary or if all boundaries are placed in one folder. (Required for the --query= option; not used when using --taskfile=.)
  • --UseLoginToken: Use a previously created login token. If set, the username and password are saved to an encrypted file. (Required for any ‘unattended’ extracts—if this switch is not used, interaction with a user is required during the extract.)
  • --Username=<Name>: Database username. (Only required if UseLoginToken is not used.)
  • --Password=<Password>: Password for specified username. (Only required if UseLoginToken is not used.)
  • --Project=<ProjectName>: CPVExtract project—not the Workspace Project. (Required if UseLoginToken used.)
  • --OutputFolder=<folderName>: Output Folder Name for extracted files. Use double quotes around the path if there are any spaces in the path. There are 4 options with this variable:
    1. If FolderCreation=OneInEach, and
      1. OutputFolder= is used, each individual boundary is processed in its own folder, using the path given for OutputFolder.
      2. OutputFolder= is not used, each individual boundary is processed in its own folder in the CPVExtractions folder of the Project.
    2. If FolderCreation=AllinOne, and
      1. OutputFolder= is used, all boundaries are processed into a folder named after the BoundaryDef variable, with one graphic for each boundary and one shared set of database files, using the path given for OutputFolder.
      2. OutputFolder= is not used, all boundaries are processed into a folder named after the BoundaryDef variable, with one graphic for each boundary and one shared set of database files, into the CPVExtractions folder of the Project.
  • --NumBoundariesPerInstance=<num>: The number of boundaries processed per instance of OpenComms Designer. (Optional)

    This variable will determine how many boundaries will be processed in a single session of OpenComms Designer during the extract. For example, if your query or taskfile contains 50 boundaries, if you place NumBoundariesPerInstance=5, the application will process 5 boundaries in one session of OpenComms Designer; and when those 5 have been processed, it will open 5 more, etc. until all 50 boundaries have been processed.

  • --LogInfoLevel=<1|5|10>: Level to which info messages are logged for errors in OpenComms Designer. 1=Minimum, 5=Medium, 10=Maximum. (Optional)
  • --LogFileName=<FullPath>: This variable should contain the full path to a log file name minus the extension. The value entered here will have the current date and time appended to the end as well as the extension. For example d:\temp\mylog will get turned into d:\temp\mylog_MMddyyyy_HHmmssFF.log where MM is the month (1-12), dd is the day (1-31), yyyy is the year, HH is 24Hr (0-23) , mm is minutes (0-59), ss is seconds (0-59), FF is 100/sec (0-99).
  • --CleanOutputFolder: Clean Output Folder before processing. Removes *.dgn, *.rdl, *.db, *.log files. (If not used, the output folder must be empty, or Extract will not complete.)
  • --EnablePerformanceTracker: Display Performance results (CSV file) at the end of the process. (Optional)